{% extends 'VipBundle:VipAdmin:layout.html.twig' %}

{% block title %}会员等级设置 - {{ parent() }}{% endblock %}

{% set menu = 'memberlevel' %}
{% set script_controller = 'vipbundle/controller/vipleveladmin/list' %}

{% set submenu = 'memberzone' %}

{% block main %}
  {{ web_macro.flash_messages() }}
  <div class="page-header clearfix">
    <a class="btn btn-info btn-sm pull-right" id="add-navigation-btn" href="{{path('admin_vip_level_create')}}">添加会员等级</a>
    <h1 class="pull-left">会员等级设置</h1>
  </div>
  
  <table id="memberlevel-table" class="table table-striped table-hover" data-search-form="#user-search-form">
    <thead>
      <tr>
        <th></th>
        <th>会员等级名称</th>
        <th>月费价格</th>
        <th>年费价格</th>
        <th>会员数量</th>
        <th>加入会员</th>
        <th>操作</th>
      </tr>
    </thead>
    <tbody id="memberlevel-list" data-sort-url="{{path('admin_vip_level_sort')}}" class="sortable-list">
      {% for memberlevel in memberlevels %}
        {% include 'VipBundle:VipLevelAdmin:tr.html.twig' with {memberlevel:memberlevel} %}
      {% else %}
        <tr><td colspan="20"><div class="empty">无会员等级记录</div></td></tr>
      {% endfor %}
    </tbody>
  </table>
  <div class="alert alert-info">
    注：会员可购买升级，升级的顺序是就上面列表中由上往下的顺序，请注意价格设置。
  </div>
  <div>
      {{ web_macro.paginator(paginator) }}
  </div>
{% endblock %}